<?php

/*
* This file is part of the symfony package.
* (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

/**
 *
 * @package    symfony
 * @subpackage plugin
 * @author     Fabien Potencier <fabien.potencier@symfony-project.com>
 * @version    SVN: $Id: sfGuardGroupPeer.php 7634 2008-02-27 18:01:40Z fabien $
 */
class sfGuardGroupPeer extends PluginsfGuardGroupPeer
{
    public static function doSelectStmt(Criteria $criteria, PropelPDO $con = null)
    {
        if(!sfContext::getInstance()->getUser()->hasCredential('super_admin')){
            $criteria->add(self::ID ,globals::$SUPERADMIN_GROUPS , Criteria::NOT_IN );
        }
        return parent::doSelectStmt($criteria, $con);
    }
}
